package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.ICancelationMotiveDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.CancelationMotive;

public class CancelationMotiveDao extends GenericDao implements ICancelationMotiveDao {
	private static final long serialVersionUID = 831733177141124417L;

	@Override
	@SuppressWarnings("unchecked")
	public List<CancelationMotive> getAllCancelationMotive(BasicFilter filter) {
		Criteria criteria = criteriaAllCancelationMotive(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllCancelationMotive(BasicFilter charter) {
		return super.criteriaAllBasic(charter, CancelationMotive.class);
	}

	@Override
	protected String getTableName() {
		return "cancelationMotive";
	}
}
